VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 3195 ClientLeft = 60 ClientTop = 345 ClientWidth = 4680 LinkTopic = "Form1" ScaleHeight = 3195 ScaleWidth = 4680 StartUpPosition = 3 'Windows Default Begin VB.OptionButton Option1 Caption = "mm/dd/yy" Height = 375 Index = 1 Left = 840 TabIndex = 1 Top = 1320 Width = 1215 End Begin VB.OptionButton Option1 Caption = "dd/mm/yy" Height = 375 Index = 0 Left = 840 TabIndex = 0 Top = 960 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False Private Const LOCALE_SSHORTDATE = &H1F Private Declare Function GetUserDefaultLCID Lib "kernel32" () As Long Private Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String, ByVal cchData As Long) As Long Private Declare Function SetLocaleInfo Lib "kernel32" Alias "SetLocaleInfoA" (ByVal Locale As Long, ByVal LCType As Long, ByVal lpLCData As String) As Long Private Sub Form_Load() Dim astring As String astring = Space(8) Call GetLocaleInfo(GetUserDefaultLCID, LOCALE_SSHORTDATE, astring, 8) If LCase(Mid(astring, 1, 1)) = "d" And LCase(Mid(astring, InStr(1, astring, "/") + 1, 1)) = "m" Then Option1(0).Value = True Else Option1(1).Value = True End If End Sub Private Sub Option1_Click(Index As Integer) If Index = 0 Then Call SetLocaleInfo(GetUserDefaultLCID, LOCALE_SSHORTDATE, "d/MM/yy") Else Call SetLocaleInfo(GetUserDefaultLCID, LOCALE_SSHORTDATE, "M/d/yy") End If End Sub